﻿using System;
using Csla.Serialization;
using Csla;

namespace Accounting.Library.GhiSo
{
    [Serializable()]
    public class BoGhiServiceCriteria : CriteriaBase<BoGhiServiceCriteria>
    {
        public BoGhiServiceCriteria() { }

        public BoGhiServiceCriteria(int loaiChungTuId, int chungTuGocId)
        {
            this.LoaiChungTuId = loaiChungTuId;
            this.ChungTuGocId = chungTuGocId;
        }

        public BoGhiServiceCriteria(int loaiChungTuId, int chungTuGocId, int nhaCungCapId, int phuongThucThanhToanId, double soTien)
        {
            this.LoaiChungTuId = loaiChungTuId;
            this.ChungTuGocId = chungTuGocId;
            this.NhaCungCapId = nhaCungCapId;
            this.PhuongThucThanhToanId = phuongThucThanhToanId;
            this.SoTien = soTien;
        }

        private static PropertyInfo<int> LoaiChungTuIdProperty = RegisterProperty<int>(p => p.LoaiChungTuId, "LoaiChungTuId");
        public int LoaiChungTuId
        {
            get { return ReadProperty(LoaiChungTuIdProperty); }
            set { LoadProperty(LoaiChungTuIdProperty, value); }
        }

        private static PropertyInfo<int> ChungTuGocIdProperty = RegisterProperty<int>(p => p.ChungTuGocId, "ChungTuGocId");
        public int ChungTuGocId
        {
            get { return ReadProperty(ChungTuGocIdProperty); }
            set { LoadProperty(ChungTuGocIdProperty, value); }
        }

        private static PropertyInfo<int> NhaCungCapIdProperty = RegisterProperty<int>(p => p.NhaCungCapId, "NhaCungCapId");
        public int NhaCungCapId
        {
            get { return ReadProperty(NhaCungCapIdProperty); }
            set { LoadProperty(NhaCungCapIdProperty, value); }
        }

        private static PropertyInfo<int> PhuongThucThanhToanIdProperty = RegisterProperty<int>(p => p.PhuongThucThanhToanId, "PhuongThucThanhToanId");
        public int PhuongThucThanhToanId
        {
            get { return ReadProperty(PhuongThucThanhToanIdProperty); }
            set { LoadProperty(PhuongThucThanhToanIdProperty, value); }
        }

        private static PropertyInfo<double> SoTienProperty = RegisterProperty<double>(p => p.SoTien, "SoTien");
        public double SoTien
        {
            get { return ReadProperty(SoTienProperty); }
            set { LoadProperty(SoTienProperty, value); }
        }
    }
}
